<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>{$Think.lang.receivingaddress}-{$tpshop_config['shop_info_store_title']}</title>
    <meta name="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
    <link rel="stylesheet" href="__STATIC__/css/index.css" type="text/css">
    <script src="__STATIC__/js/jquery-1.10.2.min.js"></script>
    <script src="__STATIC__/js/slider.js"></script>
</head>

<body>
<!--------头部开始-------------->
<include file="Public/header" />
<!--------头部结束-------------->
<script src="__PUBLIC__/js/layer/layer.js"></script><!-- 弹窗js 参考文档 http://layer.layui.com/-->

<div class="breadcrumb-area">
    <div class="layout">
        <foreach name="navigate_user" key="k" item="v">
            <if condition="$k neq '首页'"> > </if>
            <a href="{$v}">{$k}</a>
        </foreach>
    </div>
</div>
<div class="layout pa-to-10 fo-fa-ar">
    <!--菜单-->
    <include file="User/menu" />
    <!--菜单-->
    <div class="fr wi872">
        <div class="he50 wddd">
            <div class="fl ddd-h2">
                <h2><span>我的店铺</span></h2>
            </div>
            <div class="fr ddd-h2">
                <!--<h2><a class="co-red addlist_btn" onClick="seller_edit()"><span>+添加店铺</span></a></h2>-->
                <h2><a class="co-red addlist_btn" href="{:U('add_seller')}"><span>+添加店铺</span></a></h2>
            </div>
        </div>

        <div class="wddd-js ov-in">
            <div class="list-group-title">
                <table class="merge-tab" border="0" cellpadding="0" cellspacing="0">
                    <thead>
                    <tr>
                        <th  >店铺名</th>
                        <th  >添加时间</th>
                        <th  >当前状态</th>
                        <th  >操作</th>
                    </tr>
                    </thead>
                </table>
            </div>
            <div class="merge-list">

                <div class="ma-0--1">
                    <div class="o-pro">
                        <if condition="!$lists">
                        <div id="tips_message">
                            <div class="message_tipws_content">
                                <!--<div class="tips_img"><img src="__STATIC__/images/tips_message.png" style=" width:191px; height:186px;" ></div>-->
                                <div class="tipws_content">
                                    暂无店铺
                                    <!--<a href="javascript:void(0);" onClick="seller_edit({$list['address_id']})"> 添加店铺<i class="icon-chevron-right-circle"></i></a>-->
                                </div>
                                <div class="clear"></div>
                            </div>
                        </div></if>
                        <table border="0" cellpadding="0" cellspacing="0">
                            <tbody>
                            <volist name="lists" id="list">
                                <tr>
                                    <td class="   ">{$list.seller_name}</td>
                                    <td class="   ">{$list.add_time|date='Y-m-d H:i:s',###}</td>

                                    <php>if($list[seller_check]==0){</php>

                                    <td rowspan="1" class=" ">待审核</td>
                                    <td rowspan="1" class="   ">
                                        <p class="p-link  pfc"><a href="{:U('Home/User/add_seller',array('goods_id'=>$list['goods_id'],'type_id'=>$list[goods_type]))}">编辑</a></p>
                                        <p class="p-link  pfc"><a href="javascript:;" onclick="del_seller('{$list[goods_id]}')">删除</a></p>
                                    </td>



                                    <php>}elseif($list[seller_check]==1&&$list[status]==1){</php>
                                    <td rowspan="1" class=" ">在售中</td>
                                    <td rowspan="1" class="   ">
                                        <p class="p-link  pfc"><a href="javascript:xiajia_seller({$list['goods_id']})">下架</a></p>
                                    </td>
                                    <php>}elseif($list[seller_check]==1&&$list[status]==0){</php>
                                    <td rowspan="1" class=" ">待上架</td>
                                    <td rowspan="1" class="   ">--
                                        <!--<p class="p-link  pfc"><a href="javascript:xiajia_seller({$list['goods_id']})">下架</a></p>-->
                                    </td>
                                    <php>}elseif($list[seller_check]==2){</php>

                                    <td rowspan="1" class=" ">已主动下架</td>
                                    <td rowspan="1" class="   ">
                                        <p class="p-link  pfc"><a href="javascript:xiajia_seller('{$list[goods_id]}',1)">重新提交</a></p>
                                        <p class="p-link  pfc"><a class="red" href="{:U('Home/User/add_seller',array('goods_id'=>$list['goods_id'],'type_id'=>$list[goods_type]))}">编辑</a></p>
                                        <p class="p-link  pfc"><a href="javascript:;" onclick="del_seller('{$list[goods_id]}')">删除</a></p>
                                    </td>
                                    <php>}elseif($list[seller_check]==1&&$list[status]==2){</php>

                                    <td rowspan="1" class=" ">已主动下架</td>
                                    <td rowspan="1" class="   ">
                                         --
                                    </td>
                                    <php>}</php>

                                    <!--<td rowspan="1" class=" "></td>
                                    <td rowspan="1" class="   ">
                                        <p class="p-link  pfc"><a href="javascript:address_edit({$list['address_id']})">{$Think.lang.editor}</a></p>
                                        <p class="p-link  pfc"><a href="{:U('Home/User/del_address',array('id'=>$list['address_id']))}">{$Think.lang.delete}</a></p>
                                        <p class="p-link  pfc"><a class="red" href="{:U('Home/User/set_default',array('id'=>$list['address_id']))}">{$Think.lang.defaultaddress}</a></p>
                                    </td>-->
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="he80"></div>
<!--------footer-开始-------------->
<include file="Public/footer" />
<!--------footer-结束-------------->


</body>
<script>
    /*$(function () {
     $("#h-s").click(function () {
     $('.ec-ta-x').css('left','124px');
     $('.ec-ta-x').css('width','110px');
     $(this).addClass("cullent");
     $('#q-s').removeClass("cullent");
     });
     });
     */
</script>

<script>



    function xiajia_seller(goods_id,type) {
        if(type==1){
            var msg ='确定重新提交吗?';
            var href = 'index.php/Home/User/xiajia/type_id/1/goods_id/'+goods_id
        }else{
            var msg ='下架后再上架需要重新审核，确定下架吗?';
            var href = 'index.php/Home/User/xiajia/goods_id/'+goods_id
        }
        $.artConfim(msg, 'confimFrame', 'zh_cn', function (cancel) {
            if (cancel) {
                return false;
            }else{
                window.location.href=href;
            }
        })
    }




    $(function () {
        $(function () {
            $("#q-s").mouseover(function () {
                $('.ec-ta-x').css('left','0px');
                $(this).addClass("cullent");
            });
            $("#q-s").mouseout(function () {
                $('.ec-ta-x').css('left','0px');
            });
        });
        $("#h-s").mouseover(function () {
            $('.ec-ta-x').css('left','82px');
            $(this).addClass("cullent");
        });
        $("#h-s").mouseout(function () {
            $('.ec-ta-x').css('left','0px');
            $(this).removeClass("cullent");
        });
    });

    $(function () {
        $("#j-s").mouseover(function () {
            $('.ec-ta-x').css('left','164px');
            $(this).addClass("cullent");
        });
        $("#j-s").mouseout(function () {
            $('.ec-ta-x').css('left','0px');
            $(this).removeClass("cullent");
        });
    });
    /**
     * 新增修改收货地址
     * id 为零 则为新增, 否则是修改
     *  使用 公共的 layer 弹窗插件  参考官方手册 http://layer.layui.com/
     */
  /*  function seller_edit()
    {

        var url = "/index.php?m=Home&c=User&a=add_seller";	// 新增
        layer.open({
            type: 2,
            title: '添加店铺',
            scrollbar: true,
            shadeClose: true,
            shade: 0.8,
            area: ['880px', '580px'],
            content: url,
        });
    }*/
    // 添加修改收货地址回调函数
    function call_back_fun(v){
        layer.closeAll(); // 关闭窗口
        location.href = location.href;
    }
</script>
</html>